package com.example.demo.web;

import com.example.demo.entity.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by think on 2017/7/18.
 */
@RestController
public class HellowController {

    @Autowired
    private Book book;

    @RequestMapping("/hello")
    public String index(){

        return "hellow World My Name is " + book.getAuthor();
    }
}
